package com.three.lab.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class FootPrintBean implements Parcelable {

    private String _id;
    private String author;
    private String category;
    private String createdAt;
    private String desc;
    private int likeCounts;
    private String publishedAt;
    private int stars;
    private String title;
    private String type;
    private String url;
    private int views;
    private List<String> images;
    private boolean select = false;

    public FootPrintBean() {
    }

    public FootPrintBean(String _id, String author, String category, String createdAt, String desc, int likeCounts, String publishedAt, int stars, String title, String type, String url, int views, List<String> images, boolean select) {
        this._id = _id;
        this.author = author;
        this.category = category;
        this.createdAt = createdAt;
        this.desc = desc;
        this.likeCounts = likeCounts;
        this.publishedAt = publishedAt;
        this.stars = stars;
        this.title = title;
        this.type = type;
        this.url = url;
        this.views = views;
        this.images = images;
        this.select = select;
    }

    protected FootPrintBean(Parcel in) {
        _id = in.readString();
        author = in.readString();
        category = in.readString();
        createdAt = in.readString();
        desc = in.readString();
        likeCounts = in.readInt();
        publishedAt = in.readString();
        stars = in.readInt();
        title = in.readString();
        type = in.readString();
        url = in.readString();
        views = in.readInt();
        images = in.createStringArrayList();
        select = in.readByte() != 0;
    }

    public static final Creator<FootPrintBean> CREATOR = new Creator<FootPrintBean>() {
        @Override
        public FootPrintBean createFromParcel(Parcel in) {
            return new FootPrintBean(in);
        }

        @Override
        public FootPrintBean[] newArray(int size) {
            return new FootPrintBean[size];
        }
    };

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getLikeCounts() {
        return likeCounts;
    }

    public void setLikeCounts(int likeCounts) {
        this.likeCounts = likeCounts;
    }

    public String getPublishedAt() {
        return publishedAt;
    }

    public void setPublishedAt(String publishedAt) {
        this.publishedAt = publishedAt;
    }

    public int getStars() {
        return stars;
    }

    public void setStars(int stars) {
        this.stars = stars;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(_id);
        dest.writeString(author);
        dest.writeString(category);
        dest.writeString(createdAt);
        dest.writeString(desc);
        dest.writeInt(likeCounts);
        dest.writeString(publishedAt);
        dest.writeInt(stars);
        dest.writeString(title);
        dest.writeString(type);
        dest.writeString(url);
        dest.writeInt(views);
        dest.writeStringList(images);
        dest.writeByte((byte) (select ? 1 : 0));
    }
}
